home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 79 / maccd 79.iso / multimedial / GL Tron / Source / gltron / globals.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-09  |  3.1 KB  |  113 lines  |  [TEXT/CWIE]

  1. #include "gltron.h"
  2.  
  3. /* globals */
  4. Game main_game;
  5. Game *game;
  6. Game2 main_game2;
  7. Game2 *game2;
  8.  
  9. char messages[80];
  10.  
  11. /* TexFont *txf = NULL; */
  12. fonttex *guiFtx = NULL;
  13. fonttex *gameFtx = NULL;
  14. int fontID = 6;
  15.  
  16. Menu** pMenuList;
  17. Menu* pRootMenu;
  18.  
  19. int *configureKeyEntry;
  20. Menu *configureKeyMenu;
  21.  
  22. float camAngle = 0;
  23. float cam_phi = 0;
  24. float cam_chi = 3.14 / 6.0;
  25. float cam_r = CAM_CIRCLE_DIST;
  26.  
  27. unsigned char* colmap = NULL;
  28. unsigned char* debugtex = NULL;
  29. int ogl_debugtex;
  30. int colwidth;
  31.  
  32. int dirsX[] = { 0, -1, 0, 1 };
  33. int dirsY[] = { -1, 0, 1, 0 };
  34.  
  35. // screensaver hack
  36. int stoptime = 0;
  37. // menu hack
  38. int menutime;
  39. /* int lasttime; 
  40.    double dt; */
  41. /* milliseconds since last frame */
  42.  
  43. /* settings stuff */
  44.  
  45. settings_int *si;
  46. int si_count;
  47. settings_float *sf;
  48. int sf_count;
  49. settings_v *sv;
  50. int sv_count;
  51.  
  52.  
  53. int polycount; /* poly count - how much do we draw each frame? */
  54. int screenshots = 0;
  55.  
  56. /* default settings */
  57.  
  58. // int default_arena_sizes[] = { 160, 240, 400, 600, 1200 };
  59. int default_arena_sizes[] = { 160, 240, 480, 720, 1200 };
  60. // int default_texture_modifier[] = { be 
  61. float default_speeds[] = { 5.0, 6.5, 8.5, 12.0, 0.0 };
  62. /* float colors_alpha[][4] = { { 1.0, 0.2, 0.4 , 0.4}, { 0.2, 0.3, 1.0, 0.4}, */
  63. float colors_alpha[][4] = { { .6, 0.6, 0.0, 0.6}, { 0.5, 0.05, 0.25, 0.6},
  64.                { 0.2, 0.6, 0.4, 0.6 }, { 0.7, 0.7, 0.7, 0.6 } };
  65.  
  66. float colors_model[][4] = { { 1.0, 1.0, 0.0, 1.0 }, { 0.7, 0.1, 0.1, 1.0 },
  67.                { 0.3, 1.0, 0.8, 1.0 }, { 0.8, 0.8, 0.8, 1.0 } };
  68.  
  69. unsigned char debugcolors[6][4] = {
  70.   { 0, 0, 0, 0 },
  71.   { 255, 0, 0, 255 },
  72.   { 0, 255, 255, 255 },
  73.   { 0, 255, 0, 255 },
  74.   { 0, 0, 255, 255 },
  75.   { 255, 255, 255, 255 }
  76. };
  77.  
  78. float menu_fgColor[4] = { 1.0, 1.0, 1.0, 1.0 };
  79. float menu_hlColor1[4] = { 1.0, 0.2, 0.2, 1.0 };
  80. float menu_hlColor2[4] = { 1.0, 1.0, 0.0, 1.0 };
  81.  
  82. int vps = 4;
  83. int vp_max[] = { 1, 2, 4, 1 }; /* windows in this display setting */
  84. float vp_x[4][4] = { { 1 },    { 1, 1 },  { 1, 16, 1, 16 }, { 10 } };
  85. float vp_y[4][4] = { { 1 },    { 0.5, 12.5 },   { 1, 1, 12.5, 12.5 }, { 4.5 } } ;
  86. float vp_w[4][4] = { { 30 },   { 30, 30 }, { 14, 14, 14, 14 }, { 20 } };
  87. float vp_h[4][4] = { { 22.5 }, { 11.5, 11.5 }, { 10.5, 10.5, 10.5, 10.5 }, { 15 } };
  88.  
  89. #ifdef DEPTH_SORT
  90. int quadBufSize = 100;
  91. Quad *quadBuf;
  92. int *quadBufIndex;
  93. #endif
  94.  
  95.  
  96. int game_textures = 17; /* 10 + 6 + debug texture */
  97. int n_textures = 11;
  98.  
  99. texture_info textures[] = {
  100.   { 1, "gltron_floor", GL_DONT_CARE, GL_REPEAT, GL_REPEAT, TEX_FLOOR },
  101.   { 1, "gltron", GL_RGB, GL_REPEAT, GL_REPEAT, TEX_GUI },
  102.   { 1, "gltron_logo", GL_RGBA, GL_CLAMP, GL_CLAMP, TEX_LOGO },
  103.   { 1, "gltron_wall_1", GL_DONT_CARE, GL_REPEAT, GL_CLAMP, TEX_WALL1 },
  104.   { 1, "gltron_wall_2", GL_DONT_CARE, GL_REPEAT, GL_CLAMP, TEX_WALL2 },
  105.   { 1, "gltron_wall_3", GL_DONT_CARE, GL_REPEAT, GL_CLAMP, TEX_WALL3 },
  106.   { 1, "gltron_wall_4", GL_DONT_CARE, GL_REPEAT, GL_CLAMP, TEX_WALL4 },
  107.   { 1, "gltron_crash", GL_RGBA, GL_REPEAT, GL_CLAMP, TEX_CRASH },
  108.   { 1, "gltron_trail", GL_RGBA, GL_CLAMP, GL_CLAMP, TEX_TRAIL },
  109.   { 1, "gltron_traildecal", GL_RGBA, GL_REPEAT, GL_CLAMP, TEX_DECAL },
  110.   { 6, "skybox", GL_RGB, GL_CLAMP, GL_CLAMP, TEX_SKYBOX }
  111.  
  112. };
  113.